<table class="table table-striped" id="table_list_article">
	<thead>
		<tr>
			<th>{{ knp_pagination_sortable(pagination, 'Id', 'a.id') }}</th>
			<th{% if pagination.isSorted('a.Title') %} class="sorted"{% endif %}>{{ knp_pagination_sortable(pagination, 'Title', 'a.title') }}</th>
			<th>Created Date</th>
			<th class="text-right">Actions</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			{% for article in pagination %}
			<tr {% if loop.index is odd %}class="color"{% endif %}>
			    <td>{{ article.id }} </td>
			    <td>{{ article.title }}</td>
			    <td>{{ article.createdAt|created_ago  }}</td>
			    <td class="text-right">
					<button class="btn btn-xs btn-info" onclick="location.href='{{ path('inter_article_admin_view_article', {'id':article.id} ) }}'"><i class="icon-eye-open"></i></button>
					<button class="btn btn-xs btn-success" onclick="location.href='{{ path('inter_article_admin_edit_article') }}?id={{ article.id }}'" >Edit</button>
					<button class="btn btn-xs btn-danger" onclick="ArticleJavascript.deleteArticle({{ article.id }})">Delete</button>
				</td>			    
			</tr>
			{% else %}
				<tr><td colspan="2"><p>There are no article entries </p></td></tr>
			{% endfor %}
		</tr>
	</tbody>
</table>

{{ '<<||>>' }}

<div class="navigation" id="paging_navigation" >
    {{ knp_pagination_render(pagination,'InterArticleBundle:Pagination:pagination.html.twig' ) }}
</div>